package module.main.view.mainInterface.operatepanel
{
	import code.ui.SimpleToolTips;
	
	import com.darwin.darwinUI.containers.ContainerBase;
	import com.darwin.darwinUI.controls.LabelButton;
	import com.darwin.darwinUI.core.UIComponent;
	import com.darwin.darwinUI.manager.ToolTipManager;
	import com.darwin.darwinUI.manager.UIManager;
	
	import flash.events.MouseEvent;
	
	import module.main.view.ResourceConst;

	public class OperateHomeBack extends ContainerBase
	{
		private var uicommand:UIComponent;
		private var _homeBackButton:LabelButton;
		public function OperateHomeBack()
		{
			_homeBackButton = new LabelButton();
			_homeBackButton.backgroundSkin = "mainInterface." + ResourceConst.OPERATE_HOME_BACK_ICON;
			_homeBackButton.backgroundAuto = true;
			uicommand = new UIComponent();
			this.addItem(uicommand);
			this.height = _homeBackButton.background.height;
			this.width = _homeBackButton.background.width;
			init();
		}
		private function init():void
		{
			uicommand.addChild(_homeBackButton);
			_homeBackButton.addEventListener(MouseEvent.MOUSE_MOVE,moveHandler);
		}
		private function moveHandler(e:MouseEvent):void
		{
			UIManager.getToolTipManager().showTips(SimpleToolTips,e.target,"回家",ToolTipManager.UP);
		}
	}
}